import type { ApiChatMessage, ChatCompletionRequest } from './ChatCompletionModels';

export function buildChatCompletionRequest(history: ApiChatMessage[], message: string): ChatCompletionRequest {
  // 拼装 messages 数组
  const messages: ApiChatMessage[] = [
    ...history,
    { role: 'user', content: message }
  ];
  return {
    messages,
    model: 'gpt-3.5-turbo',
    temperature: 0.7,
    userId,                // 必须带上
    healthDataId: null     // 如有需要可传
  };
}